package com.wxy.demo.override;

import java.io.IOException;
import java.io.InterruptedIOException;

/**
 * <p>
 *
 * </p>
 *
 * @author e-Xiaoyuan.Wang
 * @since 2022/4/21 11:22
 */
public class Dog extends Animal {
    @Override
    public void move() {
        System.out.println("够可以跑和走");
    }

    @Override
    public String say() {
        return "汪汪汪";
    }

    public void study() {
        System.out.println("狗可以学习");
    }

    @Override
    public void error() throws IOException {
//        throw new Exception("脑壳大大的短路");
        throw new InterruptedIOException("有点小短路");
    }
}
